<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./css/font-awesome.css">
    <title>switch</title>
    <style>
        #switch {
            width: 100px;
            height: 30px;
            background: #6199F7;
            border-radius: 20px;
            position: relative
        }

        #switch .switch,
        #switch span {
            position: absolute;
            height: 100%;
            text-align: center;
        }

        #switch .switch {
            width: 30px;
            border-radius: 50%;
            background: #eee;
            left: -2px;
        }

        #switch span {
            top: 6px;
            color: #fff;
        }

        #switch .yes {
            left: 15px;
        }

        #switch .no {
            right: 15px;
            color: #000;
        }

        /* 初始否是隐藏  要初始化显示是还是否 只需要改变on这个class在dom里面的位置即可*/

        #switch.on {
            background: #ddd;
        }

        .switch.on {
            left: -2px;
        }

        #switch span.on {
            display: none;
        }
    </style>
</head>

<body>
    <div id="switch" class="on">
        <span class="yes on" data-yesorno="是">是</span>
        <div class="switch on"></div>
        <span class="no" data-yesorno="否">否</span>
    </div>
    <div class="icon-phone">
        苹果手机
    </div>
</body>

</html>
<script src="./js/jquery.min.js"></script>
<!-- <script>
    $(document).ready(function () {
        //国际化加载属性文件
        jQuery.i18n.properties({
            name: 'js',
            path: '<%=path%>/js/i18n/',
            mode: 'map',
            callback: function () {// 加载成功后设置显示内容
                //alert(jQuery.i18n.prop("theme_manage.js_activity"));
            }
        });
    });
</script> -->
<script src="./js/script.js"></script>